package mole.entities 
{
	import net.flashpunk.graphics.Image;
	import net.flashpunk.Entity;
	import net.flashpunk.FP;
	
	/**
	 * ...
	 * @author Cédric Liaudet
	 */
	public class CBackground  extends Entity
	{		
		/**
		 * 
		 * @param	_iId Identifiant du background.
		 * @param 	_iSpeed Vitesse du scroll.
		 * @param   _iLayer Niveau de profondeur.
		 */
		public function CBackground(_iId:Number, _iLayer:Number) 
		{
			graphic = new Image(FP.choose(CBackgroundAssets.s_Sprites[_iId]));
			x = 0;
			y = 0;
			
			layer = 50 - _iLayer;
			type = "background";
		}
	}

}